
local wk_heg__ningjie_card_skill = fk.CreateSkill{
  name = "wk_heg__ningjie_card_skill",
}

wk_heg__ningjie_card_skill:addEffect("cardskill", {
  mute = true,
  prompt = "#dismantlement_skill",
  target_num = 1,
  mod_target_filter = function(self, player, to_select, selected, card)
    return to_select ~= player and not to_select:isAllNude()
  end,
  target_filter = Util.CardTargetFilter,
  on_effect = function(self, room, effect)
    if effect.from.dead or effect.to.dead then return end
    if not effect.to:isAllNude() then
      local cid = room:askToChooseCard(effect.from, { target = effect.to, flag = "hej", skill_name = wk_heg__ningjie_card_skill.name })
      room:throwCard({cid}, wk_heg__ningjie_card_skill.name, effect.to, effect.from)
    end
    if effect.to:isKongcheng() then
      effect.to:drawCards(effect.to.maxHp, wk_heg__ningjie_card_skill.name)
    end
  end,
})

return wk_heg__ningjie_card_skill